<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<%@ include file="/mete.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/city_select.js"></script>
<script type="text/javascript">
	$(function(){
		$.get("${pageContext.request.contextPath}/oil_web/staff!getGasstationList.do",null,function(resp){
			var json = eval("("+resp+")");
			$("#gasstation_id").html(json.data);
		})
		$("#price_type").change(function(){
			onChange();
		});
	})
	
	function onChange(){
		console.log("on change......");
		if($("#price_type").val() == 0){
			$("#price").attr("name","PRICE");
			$("#price").val("${model.PRICE }");
		}else if($("#price_type").val() == 1){
			$("#price").attr("name","PRICE1");
			$("#price").val("${model.PRICE1 }");
		}else{
			console.log("null......");
			$("#price").attr("name","");
			$("#price").val("");
		}
	}
	
</script>
</head>
<body>
	<div class="meijieContent">
		<div class="myform app_info">
		<form action="${pageContext.request.contextPath }/competitive!add.do" class="form-horizontal n-validator n-yellow" id="frmApp" method="post" role="form">
			<h2>新增竞标</h2>
			<input type="hidden" name="AUCTION_ID" value="${model.AUCTION_ID }">
			<ul>
            <table>
            	<tr>
                    <td class="colname"><span class="warn">*</span>竞标网点:</td>
                    <td class="content">
	                    <select id="gasstation_id" name="GASSTATION_ID">
	                    	
	                    </select>
                    </td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>价格类型:</td>
                    <td class="content">
                    	<select id="price_type" name="PRICE_TYPE" >
                    		<option value="">--请--选--择--</option>
                    		<option value="0">按百分比</option>
                    		<option value="1">比市价便宜</option>
						</select>
					</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>价格:</td>
                    <td class="content"><input class="txt" id="price" placeholder="请输入价格" type="text"/></td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>竞标说明:</td>
                    <td class="content"><textarea rows="3" cols="31" id="note" name="NOTE"></textarea></td>
               </tr>
               <tr>
                    <td class="colname" colspan="2" align="center" style="padding-top: 20px">
                    	<input class="submit" type="submit" value="保  存"/>
					</td>
               </tr>
            </table>
		</ul>
	</form>
	</div>
	</div>
</body>

</html>
